package com.tdkj.model.risevalue;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.tdkj.model.base.BaseEntity;
import com.tdkj.model.user.BeanUser;

@Entity
@Table(name = "risevalue_float_color_use_info")
public class BeanFloatColorUseInfo extends BaseEntity implements java.io.Serializable {

	private Integer color;
	private List<BeanFloatColorBuy> buys;
	
	private BeanUser user ;
	private Boolean isUsing ;
	
	private Long refId;
	private String refClass;
	
	//剩下毫秒数
	private Long leftMillisecond;
	
	public Integer getColor() {
		return color;
	}
	public void setColor(Integer color) {
		this.color = color;
	}
	@OneToMany(fetch=FetchType.LAZY, cascade={CascadeType.REFRESH}, mappedBy="useInfo")
	public List<BeanFloatColorBuy> getBuys() {
		return buys;
	}
	public void setBuys(List<BeanFloatColorBuy> buys) {
		this.buys = buys;
	}
	@ManyToOne(fetch=FetchType.EAGER, cascade={CascadeType.REFRESH})
	@JoinColumn(name="user_id")
	public BeanUser getUser() {
		return user;
	}
	public void setUser(BeanUser user) {
		this.user = user;
	}
	public Boolean getIsUsing() {
		return isUsing;
	}
	public void setIsUsing(Boolean isUsing) {
		this.isUsing = isUsing;
	}
	public Long getRefId() {
		return refId;
	}
	public void setRefId(Long refId) {
		this.refId = refId;
	}
	public String getRefClass() {
		return refClass;
	}
	public void setRefClass(String refClass) {
		this.refClass = refClass;
	}
	public Long getLeftMillisecond() {
		return leftMillisecond;
	}
	public void setLeftMillisecond(Long leftMillisecond) {
		this.leftMillisecond = leftMillisecond;
	}

}